package Cafezam;

import java.util.Scanner;

public class J09Sungjuk {
	public static void main(String[] args)
	{
		String name="";
		int kor,eng,mat,tot;
		double avg;
		char grd;
		kor=0;
		eng=0;
		mat=0;
		tot=0;
		avg=0.0;
		grd=' ';
		Scanner sc=new Scanner(System.in);
//		String result="";
		
//		System.out.println("국어점수 입력");
//		kor=sc.nextInt();
//		System.out.println("영어점수 입력");
//		eng=sc.nextInt();
//		System.out.println("수학점수 입력");
//		mat=sc.nextInt();
		inputSungjuk(name,kor,eng,mat);
		getTotal(kor, eng, mat, tot);
		getAverage(avg, tot);
		getGrade(grd, avg);
		System.out.println(name);
		System.out.println(kor);
		System.out.println(eng);
		System.out.println(mat);
		System.out.println(tot);
		System.out.println(avg);
		System.out.println(grd);
		sc.close();
	}//main
	public static void inputSungjuk(String name,int kor,int eng,int mat)
	{
		Scanner sc=new Scanner(System.in);
	    
		System.out.println("이름  입력");
		name=sc.next();
		System.out.println("국어점수 입력");
		kor=sc.nextInt();
		System.out.println("영어점수 입력");
		eng=sc.nextInt();
		System.out.println("수학점수 입력");
		mat=sc.nextInt();
		sc.close();
	}

	
	public static void getTotal(int kor,int eng,int mat,int tot){
		
		tot= kor + eng + mat;
		
	}	
		public static void getAverage(double avg,int tot)
		{
			avg = (double) tot / 3;
		}
		public static void getGrade(char grd,double avg)
		{
			switch ((int) avg / 10) {
			case 10:
			case 9:
				grd = '수';
				break;
			case 8:
				grd = '우';
				break;
			case 7:
				grd = '미';
				break;
			case 6:
				grd = '양';
				break;
			default:
				grd = '가';
			}
			
		}
	
}//class
